﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LIMS.SqlServerDAL
{
    public class StuProjectService : LIMS.IDAL.IStuProject
    {
        LIMSDataContext db = new LIMSDataContext();

        /// <summary>
        /// 根据学生班级ID获取与该学生相关的实验
        /// </summary>
        /// <param name="classID">指定学生的班级ID</param>
        /// <returns>返回与该学生相关实验的ID列表</returns>
        public List<Int32> FindProByClassID(String classID)
        {
            var stuTmp = from sp in db.GetTable<TB_stuPro>()
                         where sp.classID.Trim(new char[] { ',' }).Split(',').Contains(classID)
                         select sp.proID;
            return stuTmp.ToList();
        }
    }
}
